

/**物品 */
export default abstract class Item {
	/**名称 */
	name: string = "物品";
	/**介绍 */
	intro: string = "该物品还没有介绍";

	static map = {};
	static name2Class = {};

	constructor(name: string) {
		this.name = name;
		Item.map[this.constructor.name] = this.constructor;
		Item.name2Class[this.name] = this;
	}

	equals(item: Item): boolean {
		if (this === item) return true;
		if (this.constructor.name == item.constructor.name) return true;
		return false;
	}
}